package cn.com.fattiger.framework.cms.admin.common.web;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;

/**
 * Created by Administrator on 2015/11/30.
 */
@Controller
public class FrameController {


    @RequestMapping(value = "frameCtl.do", method = RequestMethod.GET)
    public String frameCtl(Integer p, ModelMap map) {
        if (null == p) {
            p = 0;
        }
        map.put("p", p);
        return "index";
    }


    @RequestMapping(value = "tpl_{target}.do")
    public String common(@PathVariable String target) {
        return target;
    }

    @RequestMapping(value = "dynamic.do",method = RequestMethod.POST)
    @ResponseBody
    public Object dynamic(@RequestBody HashMap<String,Object> params){
        return params;
    }

}
